﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:Graph="clr-namespace:Patterns4Net.ArchitectureExplorer.ViewModels.Graph" 
                    xmlns:Diagram="clr-namespace:Patterns4Net.ArchitectureExplorer.Diagram" 
                    xmlns:Graphviz4Net="clr-namespace:Graphviz4Net.WPF.ViewModels;assembly=Graphviz4Net" 
                    xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro" 
                    xmlns:Detail="clr-namespace:Patterns4Net.ArchitectureExplorer.ViewModels.Detail" xmlns:Documentation="clr-namespace:Patterns4Net.ArchitectureExplorer.Documentation">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary>
            <DataTemplate DataType="{x:Type Detail:TypeDetailViewModel}" >
                <StackPanel Margin="0, 10, 0, 0">
                    <StackPanel Orientation="Horizontal">
                        <Image Source=".\..\..\Image\Class.png" Width="16" Height="16" Margin="0, 0, 7, 0"/>
                        <TextBlock FontSize="15" Text="{Binding Name}"></TextBlock>
                    </StackPanel>
                    
                    <StackPanel Margin="15, 5, 5, 5">
                        <ItemsControl ItemsSource="{Binding Patterns}"/>
                    </StackPanel>

                    <TextBlock TextWrapping="Wrap">
                        <TextBlock.Style>
                            <Style TargetType="TextBlock">
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding ApiDocSearchResult}">
                                        <DataTrigger.Value>
                                            <Documentation:ApiDocSearchResult>AssemblyApiDoesNotExist</Documentation:ApiDocSearchResult>
                                        </DataTrigger.Value>
                                        <Setter Property="Text">
                                            <Setter.Value>
                                            The xml file with API documentation for this assembly was not found. 
                                            Source of this documentation is an xml file produced by C# compiler. 
                                            To set up the compiler to produce this file In Visual Studio, 
                                            one has to open the project properties panel, switch to the build tab 
                                            and check the option "XML documentation file". Architecture Explorer expects 
                                            the documentation file to have a default name and to be located in the same 
                                            folder as the assembly.
                                            </Setter.Value>
                                        </Setter>
                                    </DataTrigger>                                    
                                </Style.Triggers>
                            </Style>
                        </TextBlock.Style>
                    </TextBlock>
                    
                    <ContentPresenter Content="{Binding Documentation}"/>
                </StackPanel>
            </DataTemplate>
        </ResourceDictionary>
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
